package SpringCloudBase;

import com.netflix.discovery.EurekaClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * Hello world!
 *
 */
@SpringBootApplication
@EnableEurekaClient
public class ConsumerOrderApplication
{
    public static void main( String[] args )
    {
        System.out.println( "正在启动Consumer-Order系统，请等待" );
        SpringApplication.run(ConsumerOrderApplication.class);
    }

    @Bean //自动加载RestTemplate
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
